<?php
//Start session
session_start();
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>CloudFolder</title>
        <link rel="stylesheet" href="style.css">
    </head>
    <body>


<?php

//Display header
include 'header.php';

?>

<div id="content">
<?php
//Start connecting db
$uname = "root";
$passw = "";
$dbname= "cloudfolder";
mysql_connect("localhost",$uname,$passw);
mysql_select_db($dbname) or die("Unable to select database");

//Dispatch to another file
if(isset ($_GET['logout']) || isset ($_POST['login']) || isset ($_POST['regis'])) {
    include 'auth.php';
} else if(isset ($_SESSION['uid'])) {
    include 'browse.php';
} else {
    include 'login.php';
}
?>
</div>

<?php
//Display footer
include 'footer.php';

?>


        
    </body>
</html>
